//    1:物资结算 2:供方预付款结算
import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
const request = {
    // 获取 供方预付款结算 table 列表
    getpaymentList (params) {
        return httpPost({
            url: '/materialsettle/supplierPrepaymentSettlement/query',
            params
        })
    },
    // 根据 id 查询 供方预付款结算 信息
    getPaymentById (params) {
        return httpGet({
            url: '/materialsettle/supplierPrepaymentSettlement/findById',
            params
        })
    },
    // 新增 供方预付款结算
    paymentAdd (params) {
        return httpPost({
            url: '/materialsettle/supplierPrepaymentSettlement/create',
            params
        })
    },
    // 修改 供方预付款结算
    paymentModify (params) {
        return httpPost({
            url: '/materialsettle/supplierPrepaymentSettlement/update',
            params
        })
    },
    // 删除 供方预付款结算
    paymentDel (params) {
        return httpGet({
            url: '/materialsettle/supplierPrepaymentSettlement/delete',
            params
        })
    },

    // 流程 提交
    flowCommit (params) {
        return httpPost({
            url: '/materialsettle/flowEngin/commit',
            params
        })
    },
    // 流程 获取审核历史
    getAuditHistory (params) {
        return httpPost({
            url: '/materialsettle/flowEngin/getAuditHistory',
            params
        })
    },
    // 流程 获取当前节点信息
    getCurrentUnitInfo (params) {
        return httpPost({
            url: '/materialsettle/flowEngin/getCurrentUnitInfo',
            params
        })
    },
    // 流程 审核
    flowAudit (params) {
        return httpPost({
            url: '/materialsettle/flowEngin/audit',
            params
        })
    },
    // 流程 撤销单步审核
    flowUndoAudit (params) {
        return httpPost({
            url: '/materialsettle/flowEngin/undoAudit',
            params
        })
    },
    // 流程 作废
    flowNullify (params) {
        return httpPost({
            url: '/materialsettle/common/nullify',
            params
        })
    },
    // 冲红单
    initRed (params) {
        return httpGet({
            url: '/materialsettle/supplierPrepaymentSettlement/initRedBill',
            params
        })
    },
    // 获取截止上期末预付款金额
    getPreviousTotalAmount (params) {
        return httpGet({
            url: '/materialsettle/supplierPrepaymentSettlement/getPreviousTotalAmount',
            params
        })
    },
    // 获取截止上期末累计冲预付款金额
    // getCurrentTotalWriteOffAmount(params){
    //     return httpGet()
    // },
    // 反写冲预付款金额
    reverseWritingAdvancePaymentAmount (params) {
        return httpGet({
            url: '/materialsettle/supplierPrepaymentSettlement/reverseWritingAdvancePaymentAmount',
            params
        })
    },
}

export default request